package com.googlecode.figstracter.networks;

import java.util.List;

import org.joone.engine.Layer;
import org.joone.engine.Synapse;
import org.joone.net.NeuralNet;

public class ImageClassifier extends NeuralNet {

	protected int classes;
	protected Layer[] layers;
	protected Synapse[] synapses;
	protected int[] rows;

	public ImageClassifier(int classes) {
		super();
		this.classes = classes;
	}

	protected void setup() {
		for (int i=0; i< synapses.length; ++i) {
			layers[i].addOutputSynapse(synapses[i]);
			layers[i+1].addInputSynapse(synapses[i]);
		}
		for (int i=0; i<layers.length; ++i) {
			layers[i].setRows(rows[i]);
		}
		for (int i=0; i<layers.length; ++i) {
			int layerType = NeuralNet.HIDDEN_LAYER;
			if (i==0) layerType = NeuralNet.OUTPUT_LAYER;
			else if (i == layers.length-1) layerType = NeuralNet.INPUT_LAYER;
			this.addLayer(layers[i], layerType);
		}
	}

}